#!/usr/local/bin/node

// #!/usr/bin/node  或者  #!/usr/local/bin/node      linux / mac
// #!/usr/bin/env node        windows
// var exec = require("child_process").exec;
require("shelljs/global");
var name = process.argv[2] || "coder !";


// var child = exec("echo hello " + name, function (err, stdout, stderr) {
//     if (err) {
//         throw err;
//     }
//     console.log(stdout);
// });
// console.log("hello " + name);

// var shell = require("shelljs");
// shell.exec("echo hello " + name);

if (!which("git")) {
    echo("Sorry this script require git");
    exit(1);
}
echo("hello " + name);

console.log("this is hello-cli tool !!!");